package id.co.rho.scoring.cid.framework.math.evaluator.model;

/**
 * Created by IntelliJ IDEA.
 * User: bungrudi
 * Date: 9/14/11
 * Time: 11:54 AM
 */
public class BinaryOpValueNode implements MEValueNode {

    private MEValueNode leftOp;
    private MEValueNode rightOp;
    private Operator operator;

    private BinaryOpValueNode() {
    }

    public BinaryOpValueNode(MEValueNode leftOp, MEValueNode rightOp, Operator operator) {
        this.leftOp = leftOp;
        this.rightOp = rightOp;
        this.operator = operator;
    }

    public MEValueNode getLeftOp() {
        return leftOp;
    }

    public MEValueNode getRightOp() {
        return rightOp;
    }

    public Operator getOperator() {
        return operator;
    }

    @Override
    public MEValueNode[] getChildren() {
        return new MEValueNode[] {leftOp,rightOp};
    }
}
